import ajax from './ajax'
const BASE_URL = process.env.NODE_ENV=="development"?'http://192.168.0.103':'http://dxsd.jlxmall.com'
// const BASE_URL = 'http://192.168.0.103'
import qs from 'qs'
// 1.商户注册
export const register = (data) => ajax(`${BASE_URL}/store/register`,data,'POST')
// 2.上传图片
export const uploadImg = (data) => ajax(`${BASE_URL}/school/upload_img`,data,'POST')
// 3.删除图片
export const delImg = (data) => ajax(`${BASE_URL}/school/delete_img`,qs.stringify(data),'POST')
// 4.获取学校列表
export const getSchoolList = () => ajax(`${BASE_URL}/Login/school_list`, null, 'POST')
// 5.商户登录
export const login = (data) => ajax(`${BASE_URL}/store/login`,qs.stringify(data),'POST')
// 6.商户获取自家订单
export const getMyOrderList = (data) => ajax(`${BASE_URL}/order/storeGetList`,qs.stringify(data),'POST')
// 7.获取商品分类
export const storeGetList = (data) => ajax(`${BASE_URL}/category/storeGetList`,qs.stringify(data),'POST')
// 8.获取经营范围
export const scopeList = (data) => ajax(`${BASE_URL}/Store/scope_list`,qs.stringify(data),'POST')
// 9.新增商品
export const AddGoods = (data) => ajax(`${BASE_URL}/goods/add`,qs.stringify(data),'POST')
// 10.获取分类及其商品
export const goodsList = (data) => ajax(`${BASE_URL}/Store/goods_list`,qs.stringify(data),'POST')
//11.获取当前商家信息
export const storeInfo = (data) => ajax(`${BASE_URL}/Store/store_info`,qs.stringify(data),'POST')
//12.修改商户基本信息
export const editBasic = (data) => ajax(`${BASE_URL}/store/edit_basic`,qs.stringify(data),'POST')
//13.修改营业状态
export const businessStatus = (data) => ajax(`${BASE_URL}/store/business_status`,qs.stringify(data),'POST')
//14.编辑商品
export const EditGoods = (data) => ajax(`${BASE_URL}/store/edit_goods`,qs.stringify(data),'POST')
//15.修改注册信息
export const EditStore = (data) => ajax(`${BASE_URL}/store/edit_store`,qs.stringify(data),'POST')
//16.根据状态获取自家订单
export const statusGetList = (data) => ajax(`${BASE_URL}/order/statusGetList`,qs.stringify(data),'POST')
//17.商家接单
export const receiveOrder = (data) => ajax(`${BASE_URL}/store/receiveOrder`,qs.stringify(data),'POST')
//18.商家同意退款
export const refund = (data) => ajax(`${BASE_URL}/pay/refund`,qs.stringify(data),'POST')
//19.商户拒绝退款
export const refuse = (data) => ajax(`${BASE_URL}/store/Refuse_money`,qs.stringify(data),'POST')
//20.商户添加打印机
export const addprinter = (data) => ajax(`${BASE_URL}/store/add_printer`,qs.stringify(data),'POST')
//21.测试打印机
export const testPrinter = (data) => ajax(`${BASE_URL}/store/test_print`,qs.stringify(data),'POST')
//22.商户订单记录
export const orderRecord = (data) => ajax(`${BASE_URL}/store/report`,qs.stringify(data),'POST')
//23.获取商户下评论
export const shopeva = (data) => ajax(`${BASE_URL}/shop/Order_review`,qs.stringify(data),'POST')
//24.获取验证码
export const SendMsg = (data) => ajax(`${BASE_URL}/login/send_msg`,qs.stringify(data),'POST')
//25.重置密码
export const rePwd = (data) => ajax(`${BASE_URL}/login/change_pwd`,qs.stringify(data),'POST')
//26.获取订单详情
export const orderInfo = (data) => ajax(`${BASE_URL}/order/order_info`,qs.stringify(data),'POST')
//27.商品是否售罄
export const goodOut = (data) => ajax(`${BASE_URL}/store/goods_out`,qs.stringify(data),'POST')
//28.是否可退款
export const isRefuse = (data) => ajax(`${BASE_URL}/store/is_refuse`,qs.stringify(data),'POST')
//29.获取打印机列表
export const printerList = (data) => ajax(`${BASE_URL}/store/prints_list`,qs.stringify(data),'POST')
//30.修改打印机状态
export const printerStatus = (data) => ajax(`${BASE_URL}/store/printr_status`,qs.stringify(data),'POST')
//31.删除打印机
export  const printerDel = (data) => ajax(`${BASE_URL}/store/Delprintr`,qs.stringify(data),'POST')
//32.再次打印订单
export const againPrint = (data) => ajax(`${BASE_URL}/store/again_print`,qs.stringify(data),'POST')
//33.获取商家下套餐
export const mealList = (data) => ajax(`${BASE_URL}/GoodsConf/storeGetList`,qs.stringify(data),'POST')
//34.添加套餐
export const addMeal = (data) => ajax(`${BASE_URL}/GoodsConf/storeAddList`,qs.stringify(data),'POST')
//35.修改商品
export const editMeal = (data) => ajax(`${BASE_URL}/GoodsConf/storeEditList`,qs.stringify(data),'POST')
//36.商品上下架
export const goodsShow = (data) => ajax(`${BASE_URL}/store/goods_show`,qs.stringify(data),'POST')